<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量</title>
</head>
<body>
<script type="text/javascript">
   /* var number=prompt("请问你有几个女朋友?");
    number=parseInt(number);
    if (number<0) {
        document.write("严肃点，我们这搞社会调查呢");
    }else if(number==0){
        document.write("单身狗，不要哭；妹子会有的");
    }else if(number>0&&number<2){
        document.write("祝福你和你的女朋友");
    }else{
        document.write("哥们，你不止一个女朋友啊；分我一个呗！");
    }*/
   /*var age = prompt("请输入您的年纪");
   age = parseInt(age);
   if (age >= 18) {
       document.write("您好，欢迎您的光临");
   } else {
       document.write("未满十八岁勿入!");
   }*/
   try {
       for (var i = 0; i < 5; i++) {
           document.writeln(i + "<br>");
           if (i == 3) {
               throw new Error("错误信息i=3");
           }
       }
   } catch (e) {
       document.writeln(e.message + "<br>");
   } finally {
       document.writeln("请您稍后重试");
   }
</script>
</body>
</html>